package cc.wsyw126.java.lambda.java8lambda.base;

import java.util.stream.Stream;

import static java.util.stream.Stream.concat;

public interface Performance {

	public String getName();

	public Stream<Artist> getMusicians();

	/**
	 * @return
	 */
	public default Stream<Artist> getAllMusicians() {
		return getMusicians().flatMap(artist -> {
			return concat(Stream.of(artist), artist.getMembers());
		});
	}
}
